package com.irdstudio.efp.esb.api.common;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 网贷申请中转分发Controller
 * 
 * @author heyingfeng
 * @since 2018年12月20日 下午5:49:03
 * @version 1.0
 */

@RestController
@RequestMapping("/")
public class TransferController {
	//
	// private static Logger logger = LoggerFactory.getLogger(TransferController.class);
	//
	// @Autowired
	// @Qualifier("msLoanController")
	// private MsLoanController msLoanController;
	//
	// @Autowired
	// @Qualifier("loanApplyController")
	// private LoanApplyController loanApplyController;
	//
	// @PostMapping(value = "/doRecv")
	// @ResponseBody
	// public String execute(String esbReqBodyBean) throws Exception {
	// ReqLoanAppBean reqLoanAppBean = null;
	// RespLoanAppBean respLoanAppBean = null;
	// String applSeq = "";
	// String prdCode = "";
	// try {
	// // 1.转换请求bean
	// reqLoanAppBean = JSONObject.parseObject(esbReqBodyBean, ReqLoanAppBean.class);
	// // 2.获取交易流水号或订单号
	// applSeq = reqLoanAppBean.getAppFlowNo();
	// logger.info("交易流水号[" + applSeq + "]进件申请处理开始!");
	// // 2.1.获取产品代码
	// prdCode = reqLoanAppBean.getProdCd();
	// // 3.根据产品代码处理相应逻辑
	// if (PrdCodeEnum.PRD_CODE_ZZD.getValue().equals(prdCode)) {// 周转贷
	// respLoanAppBean = loanApplyController.initNlsApplyInfo(reqLoanAppBean);
	// } else if (PrdCodeEnum.PRD_CODE_MS.getValue().equals(prdCode)) {// 马上
	// respLoanAppBean = msLoanController.initNlsApplyInfo(reqLoanAppBean);
	// } else {
	// respLoanAppBean = new RespLoanAppBean();
	// respLoanAppBean.setRetStCd(EsbBizEnums.RetCodeEnum.FAILURE.getVALUE());
	// respLoanAppBean.setRtnMsg(EsbBizEnums.RetCodeMsg.FAILURE_MSG.getVALUE());
	// respLoanAppBean.setBankInWrongCd("");
	// respLoanAppBean.setBankInWrongRsn("");
	// respLoanAppBean.setSynDistrFlg("");
	// respLoanAppBean.setLoanOrdrNo(applSeq);
	// respLoanAppBean.setBankCustNo("");
	// throw new BizException("产品代码不正确!");
	// }
	// } catch (BizException e) {
	// logger.error("进件申请处理失败!" + e.getMessage());
	// } catch (Exception e) {
	// logger.error("系统异常!");
	// }
	// return respLoanAppBean.toString();
	// }
	//
	// /* 生成联系人表id S000000001 */
	// public static String getCusId() throws Exception {
	// SequenceService sequenceService = (SequenceService) SpringContextUtils.getBean("sequenceService");
	// return sequenceService.getSequence("RELATION_ID", null, null);
	// }
	//
}
